#pragma strict

var speed:float;
var hurt:float=10f;
private var myTransform:Transform;
function Start () {
	myTransform=this.transform; 
}

function Update () {
	myTransform.Translate(Vector3.up*Time.deltaTime*speed);
	if(myTransform.position.y>=6.12)
	{
		Destroy(this.gameObject);
	}
}



//发生碰撞后爆炸
function OnTriggerEnter (other:Collider ) {
	if(other.GetComponent(Enemy))
	{
		Destroy(this.gameObject);
	}
}